package com.neusoft.elm.controller;

import com.neusoft.elm.po.Food;
import com.neusoft.elm.service.FoodService;
import com.neusoft.elm.service.Impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 食品
 * Controller层
 */
public class FoodController {

    /**
     * 根据商家ID列出食品
     *
     * @param request
     * @return
     * @throws Exception
     */
    public Object listFoodByBusinessId(HttpServletRequest request) throws Exception{
        Integer businessId = Integer.valueOf(request.getParameter("businessId"));
        FoodService service = new FoodServiceImpl();
        List<Food> list = service.listFoodByBusinessId(businessId);
        return list;
    }
}
